/*
 * MIT License
 *
 * Copyright (c) 2020 Mr.css
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package cn.seaboot.openapi.base;

/**
 * 表单类型
 *
 * @author Mr.css
 * @version 2021-04-01 14:49
 */
public enum FormType {
    /**
     * form 普通表单
     * <p>
     * 就是传统概念上的表单
     * <p>
     * mime-type：application/x-www-form-urlencoded
     */
    FORM,
    /**
     * form-data 方式提交
     * <p>
     * 一般来说，带文件的表单，需要通过 FormData 提交；
     * 在低版本的 spring 项目中，只能通过 Post 请求提交。
     * <p>
     * mime-type：multipart/form-data
     */
    FORM_DATA,
    /**
     * RequestBody / RAW
     * <p>
     * 传输一些纯文本内容
     * <p>
     * mime-type：application/json、application/xml...
     */
    BODY,
    /**
     * RequestBody / RAW
     * <p>
     * 将文件放到 body 中提交，基本没怎么用到
     * <p>
     * mime-type: application/octet-stream
     */
    BINARY,
    /**
     * GraphQL
     * <p>
     * 之前比较流行的写法，现在基本没用到
     */
    GRAPH_QL
}
